/*
 Navicat MySQL Data Transfer

 Source Server         : sms
 Source Server Type    : MySQL
 Source Server Version : 50722
 Source Host           : smsdb.c2lighgovwg5.rds.cn-northwest-1.amazonaws.com.cn
 Source Database       : smsdb

 Target Server Type    : MySQL
 Target Server Version : 50722
 File Encoding         : utf-8

 Date: 01/16/2020 16:05:15 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `sms_account_transation`
-- ----------------------------
DROP TABLE IF EXISTS `sms_account_transation`;
CREATE TABLE `sms_account_transation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `account_user_id` int(20) NOT NULL COMMENT '账号用户id',
  `transation_id` varchar(56) NOT NULL COMMENT '交易id',
  `transation_action` varchar(4) DEFAULT NULL COMMENT '交易动作，+充值，-扣费',
  `transation_price` varchar(56) DEFAULT NULL COMMENT '交易价格',
  `currency` varchar(8) DEFAULT NULL COMMENT '交易货币',
  `transation_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '交易时间',
  `operator_id` int(11) NOT NULL COMMENT '操作者',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=233 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `sms_agent`
-- ----------------------------
DROP TABLE IF EXISTS `sms_agent`;
CREATE TABLE `sms_agent` (
  `agent_id` varchar(45) NOT NULL COMMENT '短信通道代理商ID UUID',
  `agent_name` varchar(45) NOT NULL COMMENT '代理商名称',
  `agent_alias_name` varchar(45) DEFAULT NULL COMMENT '代理商别名',
  `api_key` varchar(256) NOT NULL COMMENT '短信通道代理商发送短信api_key',
  `api_secret` varchar(256) NOT NULL COMMENT '短信通道代理商发送短信api_secret',
  `api_url` varchar(256) NOT NULL COMMENT '代理商平台URL',
  `delivery_report_req` tinyint(1) DEFAULT '1' COMMENT '是否接受收货报告',
  `call_back_url` varchar(256) DEFAULT NULL COMMENT '短信平台向接入的应用程序推送发送报告回调地址',
  `sender_id` varchar(45) NOT NULL COMMENT '发送者',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态是否可用true可用,false不可用',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `group_id` varchar(45) DEFAULT NULL COMMENT '代理商分组UUID',
  `is_default` tinyint(4) DEFAULT NULL COMMENT '默认通道',
  PRIMARY KEY (`agent_id`,`agent_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='短信通道代理商';

-- ----------------------------
--  Records of `sms_agent`
-- ----------------------------
BEGIN;
INSERT INTO `sms_agent` VALUES ('07ba9af4bb713f0e041a3ff60ac770c9', 'nexmo2', 'NGW0', 'YWZmZDgwY2Y=', 'b3laMTJta3cxWG1ucmNDaw==', 'https://api.nexmo.com', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/webhooks/delivery-receipt', 'haibinn', '1', '2019-11-26 16:32:00', '2f03bfed1860fed7fdd49eedde7a5f14', '0'), ('0f64fd86560c83c87ea3a985fc9f6d34', 'nexmo3', 'NGW1', 'YmQyY2JlMWM=', 'ZXNLRVhEUjhXZm5EeEhQSw==', 'https://api.nexmo.com', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/webhooks/delivery-receipt', 'zhang.xuecong', '1', '2019-11-26 16:33:29', '2f03bfed1860fed7fdd49eedde7a5f14', '1'), ('3e07c3c84a2ab8de3105a7d381c630ac', 'cm', 'CGW0', 'Q0M3QjQ2NUUtOEEzOS00QzM5LTlFOTEtMEVENjAwN0NFQTIx', 'Q0M3QjQ2NUUtOEEzOS00QzM5LTlFOTEtMEVENjAwN0NFQTIx', 'https://gw.cmtelecom.com/v1.0/message', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/cm/delivery-receipt', 'cm', '1', '2019-11-26 16:39:24', '5adc6895a4c63cd3b819fc98341dc6c4', '1'), ('9736fb6c5880955e81da1f82d93141b4', 'sinch-GW411', 'SGW411', 'ZTk1MzA1MjlmNWMzNDFhOWEzNjYxY2U3N2I4YmY2NjQ=', 'ZGFiZTVlOTI0YWJkNDIyM2FkMDAwNzE0MmE5NDY1YzY=', 'https://sms.api.sinch.com/xms', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/sinch/delivery-report', 'sinch-GW411', '1', '2019-12-24 14:02:13', '50fb9bd6391026dbaaa10fe14092d026', '1'), ('a71773dff034ae5b31e4c4f0d88fc65b', '国内通道OTP', 'ZGW0', 'N3FzMXFoRGZESlE3S0JPNA==', 'ZmIzOHNudEdQamdpMVprODQ3RXV3Y0dMVGJZZXJFUkZhamFlTU13akFXRlZ0UFlyUjRIQmlsOXVzWHJmYXNxMw==', 'http://47.103.67.176:8890', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/domestic/delivery-receipt', 'chinaOTP', '1', '2019-12-16 14:15:01', '88454d02bcb6aa8553cde47020caabcd', '1'), ('bd7fbcf7be9494ebdc7158510e78a9cc', 'sinch3', 'SGW1', 'YTVhZjE5OTdkMTk2NGVjYmJlZGU3ZmFjNTIyN2ZkNGM=', 'ZWU5NjAwNzBhY2VjNGRlMThiZjM0NTk2M2MwYzhlZTk=', 'https://sms.api.sinch.com/xms', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/sinch/delivery-report', 'Restapi', '1', '2019-11-26 16:38:07', '50fb9bd6391026dbaaa10fe14092d026', '0'), ('bd910df673c9e74cd290df7caf39f737', '国内通道-marketing', 'ZGW1', 'NzhRNGI4R3plemhXbDdWMA==', 'dTBPRGh5VkFtVTNrdVpDd3NtWEpHRVNMQjFBaU5aS0FOTUFSWkhrUTRFQ3g5TVhWeUtSenVmd0JwSzZOUUNjTg==', 'http://47.103.67.176:8890', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/domestic/delivery-receipt', 'china-marketing', '1', '2019-12-16 14:16:15', '88454d02bcb6aa8553cde47020caabcd', '1'), ('f75ea8363f63a8534674fd7b35dce996', 'sinch2', 'SGW0', 'SGVuZ3hpbmRhX1JFU1Q=', 'OWY1ODgxMDVjNjNkNDM0NmJiNmVjOTM1MjVmMDU3NTY=', 'https://sms.api.sinch.com/xms', '1', 'http://52.83.197.175:9000/api/v1/adapter/sms/dlr/sinch/delivery-report', 'GW0', '1', '2019-11-26 16:36:26', '50fb9bd6391026dbaaa10fe14092d026', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sms_agent_group`
-- ----------------------------
DROP TABLE IF EXISTS `sms_agent_group`;
CREATE TABLE `sms_agent_group` (
  `group_id` varchar(45) NOT NULL COMMENT 'UUID',
  `group_name` varchar(45) NOT NULL COMMENT 'nexmo,sinch,cm等供应商',
  `route_id` int(11) DEFAULT NULL COMMENT '路由服务ID',
  `status` tinyint(1) DEFAULT '1' COMMENT 'True表示可用，false表示不可用',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`group_id`),
  UNIQUE KEY `group_name_UNIQUE` (`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代理商分组表';

-- ----------------------------
--  Records of `sms_agent_group`
-- ----------------------------
BEGIN;
INSERT INTO `sms_agent_group` VALUES ('2f03bfed1860fed7fdd49eedde7a5f14', 'nexmo', '1000', '1', '2019-11-26 16:28:30'), ('50fb9bd6391026dbaaa10fe14092d026', 'sinch', '1001', '1', '2019-11-26 16:28:38'), ('5adc6895a4c63cd3b819fc98341dc6c4', 'cm', '1002', '1', '2019-11-26 16:28:43'), ('88454d02bcb6aa8553cde47020caabcd', '国内通道', '1003', '1', '2019-12-16 14:12:58');
COMMIT;

-- ----------------------------
--  Table structure for `sms_agent_route`
-- ----------------------------
DROP TABLE IF EXISTS `sms_agent_route`;
CREATE TABLE `sms_agent_route` (
  `route_id` int(11) NOT NULL AUTO_INCREMENT,
  `route_service` varchar(256) NOT NULL COMMENT '后台调用服务名(初始化时必须指定)',
  `route_service_bean_id` varchar(256) DEFAULT NULL COMMENT '后台短信提交服务BeanId',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`route_id`),
  UNIQUE KEY `route_id_UNIQUE` (`route_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1004 DEFAULT CHARSET=utf8mb4 COMMENT='路由服务';

-- ----------------------------
--  Records of `sms_agent_route`
-- ----------------------------
BEGIN;
INSERT INTO `sms_agent_route` VALUES ('1000', 'Nexmo路由服务', 'nexmoSubmitMessageService', '2019-12-09 17:01:14'), ('1001', 'Sinch路由服务', 'sinchSubmitMessageService', '2019-12-09 17:02:27'), ('1002', 'CM路由服务', 'cmSubmitMessageService', '2019-12-09 17:02:46'), ('1003', '国内路由服务', 'domesticSubmitMessageService', '2019-12-16 14:12:09');
COMMIT;

-- ----------------------------
--  Table structure for `sms_api`
-- ----------------------------
DROP TABLE IF EXISTS `sms_api`;
CREATE TABLE `sms_api` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `category_id` bigint(20) DEFAULT NULL COMMENT '类别Id',
  `call_method` varchar(56) DEFAULT NULL COMMENT '调用方式',
  `call_address` varchar(215) DEFAULT NULL COMMENT '调用地址',
  `call_demo` varchar(512) DEFAULT NULL COMMENT '调用示例',
  `res_demo` varchar(512) DEFAULT NULL COMMENT '响应示例',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_api`
-- ----------------------------
BEGIN;
INSERT INTO `sms_api` VALUES ('1', '1', 'HTTP POST', 'http://52.83.197.175:9000/api/v1/adapter/sms/open/submit', 'curl -X POST \"http://localhost:9000/api/v1/adapter/sms/open/submit\" -H \"accept: application/json\" -H \"password: your_password\" -H \"username: your_name\" -H \"Content-Type: application/json\" -d \"{ \\\"messageBody\\\": \\\"test message\\\", \\\"recipientList\\\": [ \\\"8615017935045\\\" ], \\\"sender\\\": \\\"test1\\\", \\\"smsType\\\": \\\"single\\\"}\"', '{   \"status\": 200,   \"data\": null,   \"message\": \"Success\",   \"timestamp\": \"2019-12-18T10:13:50.094\" }'), ('2', '5', 'HTTP POST', 'http://52.83.197.175:9000/api/v1/adapter/sms/report', 'curl -X POST \"http://52.83.197.175:9000/api/v1/adapter/sms/report\" -H \"accept: application/json\" -H \"password: cc03e747a6afbbcbf8be7668acfebee5\" -H \"username: test123\" -H \"Content-Type: application/json\" -d \"{ \\\"actionType\\\": \\\"SMS\\\", \\\"queryReportEndTime\\\": \\\"2019-12-18 23:19:30\\\", \\\"queryReportStartTime\\\": \\\"2019-12-01 16:19:30\\\", \\\"recipient\\\": 8615017935045, \\\"reportColumns\\\": \\\"countryName,prefix,networkName,status,recipient,price,messageBody\\\", \\\"requestType\\\": \\\"HTTP POST\\\"}\"', '{\n  \"status\": 200,\n  \"data\": [\n    {\n      \"messageBody\": \"test message\",\n      \"messageId\": \"3bT07jNP6LzP0ylL\",\n      \"network\": null,\n      \"finalStatus\": \"failed\",\n      \"reason\": null,\n      \"messageTimestamp\": null,\n      \"networkName\": \"Unknown\",\n      \"countryName\": \"Unknown\",\n      \"prefix\": \"Unknown\",\n      \"free\": 0.025,\n      \"sendTo\": \"8615017935045\"\n    }\n  ],\n  \"message\": \"Success\",\n  \"timestamp\": \"2019-12-18T11:22:34.695\"\n}');
COMMIT;

-- ----------------------------
--  Table structure for `sms_api_category`
-- ----------------------------
DROP TABLE IF EXISTS `sms_api_category`;
CREATE TABLE `sms_api_category` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `category_name` varchar(56) DEFAULT NULL COMMENT '类别名称',
  `des` text COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_api_category`
-- ----------------------------
BEGIN;
INSERT INTO `sms_api_category` VALUES ('1', '短信API', '短信API支持国内外发送短信'), ('5', '查询短信报告API', '查询短信报告');
COMMIT;

-- ----------------------------
--  Table structure for `sms_api_req_param`
-- ----------------------------
DROP TABLE IF EXISTS `sms_api_req_param`;
CREATE TABLE `sms_api_req_param` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `api_id` bigint(20) DEFAULT NULL COMMENT 'api的id',
  `param_name` varchar(56) DEFAULT NULL COMMENT '参数名',
  `param_type` varchar(56) DEFAULT NULL COMMENT '参数类型',
  `must_fill` tinyint(8) DEFAULT NULL COMMENT '必填0是，1否',
  `des` text COMMENT '描述',
  `demo` text COMMENT '示例',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_api_req_param`
-- ----------------------------
BEGIN;
INSERT INTO `sms_api_req_param` VALUES ('6', '1', 'messageBody', 'string', '0', 'Body 参数messageBody 发送短信内容', 'messageBody'), ('9', '1', 'recipientList', 'list', '0', 'Body 参数 recipientList 短信接收号码列表', '\"recipientList\": [ \"8615017935046,8615017935047\" ]'), ('11', '1', 'smsType', 'string', '0', 'Body 参数 smsType', 'smsType: \"single\"'), ('12', '1', 'password', 'string', '0', 'Header 参数 password由销售经理提供,明文密码需要MD5加密后添加至头部传递', 'password'), ('13', '1', 'username', 'string', '0', 'Header 参数  username由销售经理提供，添加至头部传递', 'username'), ('14', '2', 'actionType', 'string', '0', 'Body参数actionType', '\"actionType\": \"SMS\"'), ('15', '2', 'queryReportEndTime', 'string', '0', 'Body参数 查询报告时间', '\"queryReportEndTime\": \"2019-12-03 23:19:30\"'), ('16', '2', 'queryReportStartTime', 'string', '0', 'Body参数查询报告结束时间', '\"queryReportStartTime\": \"2019-12-02 16:19:30\"'), ('17', '2', 'recipient', 'string', '0', 'Body参数recipient短信号码必须要加号码前缀如中国86', '\"recipient\": 8615017935045,'), ('18', '2', 'reportColumns', 'string', '1', 'Body参数reportColumns可以不传', 'reportColumns'), ('19', '2', 'requestType', 'string', '0', 'Body参数requestType默认传\"HTTP POST\"', '\"requestType\": \"HTTP POST\"'), ('20', '2', 'password', 'string', '0', 'Header 参数 password由销售经理提供,明文密码需要MD5加密后添加至头部传递', 'password'), ('21', '2', 'username', 'username', '0', 'Header 参数 username由销售经理提供,添加至头部传递', 'username'), ('22', '1', 'sender', 'string', '0', 'sender发件人', 'sender');
COMMIT;

-- ----------------------------
--  Table structure for `sms_api_res_param`
-- ----------------------------
DROP TABLE IF EXISTS `sms_api_res_param`;
CREATE TABLE `sms_api_res_param` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `api_id` bigint(20) DEFAULT NULL COMMENT 'api的id',
  `res_param` varchar(56) DEFAULT NULL COMMENT '响应参数',
  `des` text COMMENT '描述',
  `demo` text COMMENT '示例',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_api_res_param`
-- ----------------------------
BEGIN;
INSERT INTO `sms_api_res_param` VALUES ('3', '1', 'status', 'status200表示成功提交401表示没有权限用户名密码错误，420表示内部业务处理异常，500服务异常。', '\"status\": 200'), ('4', '1', 'message', 'message消息提示', 'message:success'), ('5', '1', 'data', '响应数据为空', 'data'), ('6', '1', 'timestamp', 'timestamp时间', '\"timestamp\":\"2019-12-18T10:25:29.225\"'), ('7', '2', 'status', 'status200表示成功提交401表示没有权限用户名密码错误，420表示内部业务处理异常，500服务异常。', '\"status\": 200'), ('8', '2', 'message', 'message消息提示', 'message:success'), ('9', '2', 'data', '响应数据为空', '{\n  \"status\": 200,\n  \"data\": [\n    {\n      \"messageBody\": \"test message\",\n      \"messageId\": \"3bT07jNP6LzP0ylL\",\n      \"network\": null,\n      \"finalStatus\": \"failed\",\n      \"reason\": null,\n      \"messageTimestamp\": null,\n      \"networkName\": \"Unknown\",\n      \"countryName\": \"Unknown\",\n      \"prefix\": \"Unknown\",\n      \"free\": 0.025,\n      \"sendTo\": \"8615017935045\"\n    }\n  ],\n  \"message\": \"Success\",\n  \"timestamp\": \"2019-12-18T11:22:34.695\"\n}'), ('10', '2', 'timestamp', 'timestamp时间', '\"timestamp\":\"2019-12-18T10:25:29.225\"');
COMMIT;

-- ----------------------------
--  Table structure for `sms_article_category`
-- ----------------------------
DROP TABLE IF EXISTS `sms_article_category`;
CREATE TABLE `sms_article_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `category_name` varchar(56) DEFAULT NULL COMMENT '分类名称',
  `describe` text COMMENT '描述',
  `category_alias` varchar(56) DEFAULT NULL COMMENT '分类别名',
  `img_url` varchar(512) DEFAULT NULL COMMENT '图片路径',
  `parent_id` int(11) DEFAULT NULL COMMENT '父类Id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `sms_delivery_receipt`
-- ----------------------------
DROP TABLE IF EXISTS `sms_delivery_receipt`;
CREATE TABLE `sms_delivery_receipt` (
  `receipt_id` varchar(45) NOT NULL COMMENT 'UUID',
  `message_id` varchar(45) NOT NULL COMMENT '消息ID为UUID',
  `sent_from` varchar(45) DEFAULT NULL COMMENT '发送者',
  `sent_to` varchar(45) NOT NULL COMMENT '接收者',
  `direction` varchar(45) DEFAULT 'Outing' COMMENT '方向',
  `status` varchar(45) DEFAULT NULL COMMENT '消息状态delivered，expired，failed，rejected，accepted，buffered或者unknown',
  `price` decimal(18,8) DEFAULT NULL COMMENT '费用',
  `error_code` varchar(256) DEFAULT NULL COMMENT '错误编码',
  `reason` mediumtext COMMENT '错误原因',
  `network_code` varchar(45) DEFAULT NULL COMMENT '网络编码',
  `message_count` int(11) DEFAULT NULL COMMENT '消息条数',
  `scts` varchar(45) DEFAULT NULL COMMENT '接受到运营商报告的时间',
  `message_timestamp` datetime DEFAULT NULL COMMENT '代理商开始将此交付收据推送到您的Webhook端点的时间\\n2020-01-01 12:00:00 +0000',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `last_update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`receipt_id`,`message_id`,`sent_to`),
  UNIQUE KEY `receipt_id_UNIQUE` (`receipt_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息明细';

-- ----------------------------
--  Table structure for `sms_download_report_log`
-- ----------------------------
DROP TABLE IF EXISTS `sms_download_report_log`;
CREATE TABLE `sms_download_report_log` (
  `log_id` int(32) NOT NULL AUTO_INCREMENT,
  `action_type` varchar(45) DEFAULT 'SMS' COMMENT '动作类型(SMS)',
  `request_type` varchar(45) DEFAULT 'HTTP POST' COMMENT '提交方法(HTTP POST,HTTP GET,ALL)',
  `query_report_start_time` datetime DEFAULT NULL COMMENT '查询报告开始时间',
  `query_report_end_time` datetime DEFAULT NULL COMMENT '查询报告结束时间',
  `download_report_finish_time` datetime DEFAULT NULL COMMENT '下载报告完成时间',
  `download_status` varchar(45) DEFAULT 'pending' COMMENT '下载状态(pending, downloading, success, failed,unknown)',
  `user_id` int(11) DEFAULT NULL COMMENT '用户ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=231 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `sms_email_setting`
-- ----------------------------
DROP TABLE IF EXISTS `sms_email_setting`;
CREATE TABLE `sms_email_setting` (
  `id` int(11) NOT NULL COMMENT '主键id',
  `sender` varchar(54) DEFAULT NULL COMMENT '发件人',
  `email_address` varchar(256) DEFAULT NULL COMMENT '邮箱地址',
  `smtp_server` varchar(256) DEFAULT NULL COMMENT 'smtp服务器',
  `connect_method` varchar(256) DEFAULT NULL COMMENT '连接方式',
  `smtp_server_port` varchar(256) DEFAULT NULL COMMENT 'smtp服务端口',
  `sender_accout` varchar(256) DEFAULT NULL COMMENT '发件箱账号',
  `sender_password` varchar(256) DEFAULT NULL COMMENT '发件箱密码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `sms_error_code`
-- ----------------------------
DROP TABLE IF EXISTS `sms_error_code`;
CREATE TABLE `sms_error_code` (
  `error_code` int(255) DEFAULT NULL,
  `error_type` varchar(256) DEFAULT NULL,
  `reason` longtext,
  `custom_reason` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_error_code`
-- ----------------------------
BEGIN;
INSERT INTO `sms_error_code` VALUES ('1', 'sinch', 'Internal routing error', '系统异常'), ('2', 'sinch', 'Internal routing error', '参数错误'), ('3', 'sinch', 'Internal routing error', '参数错误'), ('4', 'sinch', 'Internal routing error', '鉴权错误'), ('5', 'sinch', 'Internal routing error', '服务处理请求异常'), ('6', 'sinch', 'Internal routing error', '无效的号码'), ('7', 'sinch', 'Internal routing error', '参数不合法'), ('8', 'sinch', 'Internal routing error', '参数不合法'), ('9', 'sinch', 'Unsupported number plan', '参数不合法'), ('10', 'sinch', 'Unsupported type of number', '参数不合法'), ('11', 'sinch', 'Message not deliver', '参数不合法'), ('12', 'sinch', 'Dialling zone not found', '参数不合法'), ('13', 'sinch', 'Not home zone and IMSI not allowed', '通讯失败'), ('14', 'sinch', 'Not home zone and IMSI fetch failed', '参数错误'), ('15', 'sinch', 'Screening block', '参数错误'), ('16', 'sinch', 'Terminating IMSI blocked', null), ('17', 'sinch', 'Destination network type unknown', null), ('18', 'sinch', 'ESME error', null), ('19', 'sinch', 'Originating location mismatch', null), ('40', 'sinch', 'Internal error', null), ('50', 'sinch', 'Internal error', null), ('51', 'sinch', 'Internal error', null), ('52', 'sinch', 'Internal error', null), ('53', 'sinch', 'Internal error', null), ('54', 'sinch', 'Internal error', null), ('55', 'sinch', 'Internal error', null), ('56', 'sinch', 'Internal error', null), ('60', 'sinch', 'Error, originator blocked', null), ('61', 'sinch', 'Error, destination blocked', null), ('62', 'sinch', 'Error, keyword blocked', null), ('63', 'sinch', 'Error, SC address blocked', null), ('64', 'sinch', 'Error, blocked due to exceeded quota', null), ('65', 'sinch', 'Error, loop detected', null), ('66', 'sinch', 'Error, data coding scheme blocked', null), ('67', 'sinch', 'Error, information element identifier blocked', null), ('70', 'sinch', 'Internal error', null), ('71', 'sinch', 'Internal error', null), ('72', 'sinch', 'Internal error', null), ('73', 'sinch', 'Internal error', null), ('74', 'sinch', 'Internal error', null), ('75', 'sinch', 'Internal error', null), ('76', 'sinch', 'Internal error', null), ('77', 'sinch', 'IMSI lookup blocked', null), ('100', 'sinch', 'Unidentified Subscriber', null), ('101', 'sinch', 'Facility not supported', null), ('102', 'sinch', 'System failure', null), ('103', 'sinch', 'Unexpected data value', null), ('104', 'sinch', 'Data missing', null), ('105', 'sinch', 'Equipment protocol error', null), ('106', 'sinch', 'Unknown service centre address', null), ('107', 'sinch', 'Service centre congestion', null), ('108', 'sinch', 'Invalid short message entity address', null), ('109', 'sinch', 'Subscriber not service centre subscriber', null), ('110', 'sinch', 'Reject', null), ('111', 'sinch', 'Local Cancel', null), ('112', 'sinch', 'Abort', null), ('113', 'sinch', 'Exception (internal)', null), ('114', 'sinch', 'Unknown error', null), ('150', 'sinch', 'Unknown subscriber', null), ('151', 'sinch', 'Call barred', null), ('152', 'sinch', 'Teleservice not provisioned', null), ('153', 'sinch', 'Absent subscriber', null), ('154', 'sinch', 'Facility not supported', null), ('155', 'sinch', 'System failure', null), ('156', 'sinch', 'Unexpected data value', null), ('157', 'sinch', 'Data missing', null), ('158', 'sinch', 'Memory capacity exceeded', null), ('159', 'sinch', 'Mobile subscriber not reachable', null), ('160', 'sinch', 'Reject', null), ('161', 'sinch', 'Local Cancel', null), ('162', 'sinch', 'Abort', null), ('163', 'sinch', 'Exception (internal)', null), ('164', 'sinch', 'Unknown error', null), ('200', 'sinch', 'Unidentified subscriber', null), ('201', 'sinch', 'Absent subscriber, IMSI detached', null), ('202', 'sinch', 'Absent subscriber, no page response', null), ('203', 'sinch', 'Subscriber busy for MT SMS', null), ('204', 'sinch', 'Facility not supported', null), ('205', 'sinch', 'Illegal subscriber', null), ('206', 'sinch', 'Illegal equipment', null), ('207', 'sinch', 'System failure', null), ('208', 'sinch', 'Unexpected data value', null), ('209', 'sinch', 'Data missing', null), ('210', 'sinch', 'Memory capacity exceeded', null), ('211', 'sinch', 'Equipment protocol error', null), ('212', 'sinch', 'Equipment not short message equipped', null), ('213', 'sinch', 'Reject', null), ('214', 'sinch', 'Local Cancel', null), ('215', 'sinch', 'Abort', null), ('216', 'sinch', 'Exception (internal)', null), ('217', 'sinch', 'Unknown error', null), ('250', 'sinch', 'Error, personal service barring, MO Personal De', null), ('251', 'sinch', 'Error, personal service barring, MO Personal De', null), ('252', 'sinch', 'Error, personal service barring, MO Operator De', null), ('253', 'sinch', 'Error, personal service barring, MO Operator De', null), ('254', 'sinch', 'Error, personal service barring, MT Personal De', null), ('255', 'sinch', 'Error, personal service barring, MT Personal De', null), ('256', 'sinch', 'Error, personal service barring, MT Operator De', null), ('257', 'sinch', 'Error, personal service barring, MT Operator De', null), ('300', 'sinch', 'Invalid destination address', null), ('301', 'sinch', 'Invalid destination numbering plan', null), ('302', 'sinch', 'Invalid destination type of number', null), ('303', 'sinch', 'Invalid destination flag', null), ('304', 'sinch', 'Invalid number of destinations', null), ('310', 'sinch', 'Invalid source address', null), ('311', 'sinch', 'Invalid source numbering plan', null), ('312', 'sinch', 'Invalid source type of number', null), ('320', 'sinch', 'ESME Receiver permanent error', null), ('321', 'sinch', 'ESME Receiver reject error', null), ('322', 'sinch', 'ESME Receiver temporary error', null), ('330', 'sinch', 'Invalid command length', null), ('331', 'sinch', 'Invalid service type', null), ('332', 'sinch', 'Invalid operation', null), ('333', 'sinch', 'Operation not allowed', null), ('334', 'sinch', 'Invalid parameter', null), ('335', 'sinch', 'Parameter not allowed', null), ('336', 'sinch', 'Invalid parameter length', null), ('337', 'sinch', 'Invalid optional parameter', null), ('338', 'sinch', 'Optional parameter missing', null), ('339', 'sinch', 'Invalid validity parameter', null), ('340', 'sinch', 'Invalid scheduled delivery parameter', null), ('341', 'sinch', 'Invalid distribution list', null), ('342', 'sinch', 'Invalid message class', null), ('343', 'sinch', 'Invalid message length', null), ('344', 'sinch', 'Invalid message reference', null), ('345', 'sinch', 'Invalid number of messages', null), ('346', 'sinch', 'Invalid predefined message', null), ('347', 'sinch', 'Invalid priority', null), ('348', 'sinch', 'Invalid replace flag', null), ('349', 'sinch', 'Request failed', '请求失败'), ('350', 'sinch', 'Invalid delivery report request', null), ('360', 'sinch', 'Message queue full', null), ('361', 'sinch', 'Extenal error', null), ('362', 'sinch', 'Extenal error', null), ('370', 'sinch', 'Cannot find information', null), ('399', 'sinch', 'Unknown', null), ('1', 'nexmo', 'Message was not delivered, and no reason could be determined', '系统异常'), ('2', 'nexmo', 'Message was not delivered because handset was temporarily unavailable - retry', '参数错误'), ('3', 'nexmo', 'The number is no longer active and should be removed from your database', '参数错误'), ('4', 'nexmo', 'This is a permanent error:the number should be removed from your database and the user must contact their network operator to remove the bar', '鉴权错误'), ('5', 'nexmo', 'There is an issue relating to portability of the number and you should contact the network operator to resolve it', '服务处理请求异常'), ('6', 'nexmo', 'The message has been blocked by a carrier\'s anti-spam filter', '无效的号码'), ('7', 'nexmo', 'The handset was not available at the time the message was sent - retry', '参数不合法'), ('8', 'nexmo', 'The message failed due to a network error - retry', '参数不合法'), ('9', 'nexmo', 'The user has specifically requested not to receive messages from a specific service', '参数不合法'), ('10', 'nexmo', 'There is an error in a message parameter, e.g. wrong encoding flag', '参数不合法'), ('11', 'nexmo', ' cannot find a suitable route to deliver the message - contact support', '参数不合法'), ('12', 'nexmo', 'A route to the number cannot be found - confirm the recipient\'s number', '参数不合法'), ('13', 'nexmo', 'The target cannot receive your message due to their age', '通讯失败'), ('14', 'nexmo', 'The recipient should ask their carrier to enable SMS on their plan', '参数错误'), ('15', 'nexmo', 'The recipient is on a prepaid plan and does not have enough credit to receive your message', '参数错误'), ('99', 'nexmo', 'Typically refers to an error in the route - contact support', null), ('999', 'cm', 'Unknown error, please contact CM support', null), ('101', 'cm', 'Authentication of the request failed', null), ('102', 'cm', 'The account using this authentication has insufficient balance', null), ('103', 'cm', 'The product token is incorrect', null), ('201', 'cm', 'This request has one or more errors in its messages. Some or all messages have not been sent. See MSGs for details', null), ('202', 'cm', 'This request is malformed, please confirm the JSON and that the correct data types are used', null), ('203', 'cm', 'The request\'s MSG array is incorrect', null), ('301', 'cm', 'This MSG has an invalid From field (per msg)', null), ('302', 'cm', 'This MSG has an invalid To field (per msg)', null), ('303', 'cm', 'This MSG has an invalid Phone Number in the To field (per msg,)', null), ('304', 'cm', 'This MSG has an invalid Body field (per msg)', null), ('305', 'cm', 'This MSG has an invalid field. Please confirm with the documentation (per msg)', null), ('401', 'cm', 'Message has been spam filtered', null), ('402', 'cm', 'Message has been blacklisted', null), ('403', 'cm', 'Message has been rejected', null), ('500', 'cm', 'An internal error has occurred', null), ('1', 'domestic', '系统异常', '系统异常'), ('2', 'domestic', '参数错误', '参数错误'), ('3', 'domestic', '参数错误', '参数错误'), ('4', 'domestic', '鉴权错误', '鉴权错误'), ('5', 'domestic', '签名错误,账户信息有误', '服务处理请求异常'), ('6', 'domestic', '号码异常', '无效的号码'), ('7', 'domestic', '短信内容异常', '参数不合法'), ('0', 'cm', '接收成功', '接受成功'), ('1', 'cm', '接收被拒绝', '接收被拒绝'), ('2', 'cm', '发送成功', '发送成功'), ('3', 'cm', '发送失败', '发送失败'), ('0', 'domestic', '接收成功', '接收成功'), ('0', 'sinch', '接收成功', '接收成功'), ('0', 'nexmo', '接收成功', '接收成功');
COMMIT;

-- ----------------------------
--  Table structure for `sms_friendship_link`
-- ----------------------------
DROP TABLE IF EXISTS `sms_friendship_link`;
CREATE TABLE `sms_friendship_link` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `name` varchar(54) DEFAULT NULL COMMENT '名称',
  `link_address` varchar(256) DEFAULT NULL COMMENT '链接地址',
  `icon` varchar(256) DEFAULT NULL COMMENT '图标',
  `des` text COMMENT '描述',
  `open_method` tinyint(4) DEFAULT NULL COMMENT '打开方式',
  `state` tinyint(4) DEFAULT NULL COMMENT '0显示，1隐藏',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_friendship_link`
-- ----------------------------
BEGIN;
INSERT INTO `sms_friendship_link` VALUES ('1', '百度', 'www.baidu.com', null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `sms_menu_role`
-- ----------------------------
DROP TABLE IF EXISTS `sms_menu_role`;
CREATE TABLE `sms_menu_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL COMMENT '角色ID',
  `menu_id` int(11) DEFAULT NULL COMMENT '菜单ID',
  `crud_operation` int(11) DEFAULT NULL COMMENT '操作权限，1，表示拥有添加，2表示读取，4表示拥有更新，8表示删除',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=906 DEFAULT CHARSET=utf8mb4 COMMENT='菜单权限表';

-- ----------------------------
--  Records of `sms_menu_role`
-- ----------------------------
BEGIN;
INSERT INTO `sms_menu_role` VALUES ('5', '13', '58', null, null), ('6', '13', '56', null, null), ('249', '8', '10', null, null), ('250', '8', '26', null, null), ('251', '8', '31', null, null), ('252', '8', '33', null, null), ('253', '8', '40', null, null), ('769', '7', '10', null, null), ('770', '7', '12', null, null), ('771', '7', '43', null, null), ('772', '7', '46', null, null), ('773', '7', '51', null, null), ('774', '7', '53', null, null), ('775', '7', '49', null, null), ('776', '7', '59', null, null), ('777', '7', '40', null, null), ('778', '7', '11', null, null), ('779', '7', '45', null, null), ('780', '7', '26', null, null), ('781', '7', '28', null, null), ('874', '6', '10', null, null), ('875', '6', '11', null, null), ('876', '6', '12', null, null), ('877', '6', '43', null, null), ('878', '6', '44', null, null), ('879', '6', '45', null, null), ('880', '6', '46', null, null), ('881', '6', '47', null, null), ('882', '6', '50', null, null), ('883', '6', '52', null, null), ('884', '6', '60', null, null), ('885', '6', '49', null, null), ('886', '6', '13', null, null), ('887', '6', '14', null, null), ('888', '6', '26', null, null), ('889', '6', '27', null, null), ('890', '6', '28', null, null), ('891', '6', '54', null, null), ('892', '6', '55', null, null), ('893', '6', '56', null, null), ('894', '6', '57', null, null), ('895', '6', '58', null, null), ('896', '6', '59', null, null), ('897', '6', '64', null, null), ('898', '6', '40', null, null), ('899', '6', '63', null, null), ('900', '6', '34', null, null), ('901', '6', '35', null, null), ('902', '6', '36', null, null), ('903', '6', '37', null, null), ('904', '6', '38', null, null), ('905', '6', '39', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `sms_message_detailed`
-- ----------------------------
DROP TABLE IF EXISTS `sms_message_detailed`;
CREATE TABLE `sms_message_detailed` (
  `message_id` varchar(45) NOT NULL COMMENT 'messageID',
  `type` varchar(45) DEFAULT 'MT' COMMENT '消息类型。MT（移动设备终止或出站）或MO（移动设备原始或入站）',
  `account_id` varchar(45) DEFAULT NULL COMMENT '使用平台中的哪个账户发送的',
  `network` varchar(45) DEFAULT NULL COMMENT '网络编码46000',
  `send_from` varchar(45) DEFAULT NULL COMMENT '发送者',
  `send_to` varchar(45) DEFAULT NULL COMMENT '接受者',
  `message_body` varchar(1024) DEFAULT NULL COMMENT '消息内容',
  `date_received` datetime DEFAULT NULL COMMENT '平台以以下格式接收您的请求时的UTC + 0的日期和时间：YYYY-MM-DD HH:MM:SS。',
  `price` decimal(18,4) DEFAULT NULL COMMENT '价格',
  `date_closed` datetime DEFAULT NULL COMMENT '平台从发送MT消息的运营商处收到交付收据时的UTC + 0的日期和时间。此参数的格式如下YYYY-MM-DD HH:MM:SS。',
  `latency` int(11) DEFAULT NULL COMMENT 'date-received之间date-closed的总延迟（以毫秒为单位）',
  `client_ref` varchar(45) DEFAULT NULL COMMENT '您在请求中设置的内部参考',
  `status` varchar(45) DEFAULT NULL COMMENT '解释消息在传递过程中的位置的代码。如果状态不是，delivered请检查error-code更多信息。如果status为，则accepted忽略的值error-code。\ndelivered，expired，failed，rejected，accepted，buffered或者unknown',
  `final_status` varchar(45) DEFAULT NULL COMMENT '状态message-id的date-closed。\nDELIVRD，EXPIRED，UNDELIV，REJECTD或者UNKNOWN',
  `error_code` int(11) DEFAULT NULL COMMENT '0，1，2，3，4，5，6，7，8，9，10，11，12，13，14，15，99，400或者401',
  `error_code_label` varchar(45) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `last_update` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`message_id`),
  UNIQUE KEY `message_id_UNIQUE` (`message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_message_detailed`
-- ----------------------------
BEGIN;
INSERT INTO `sms_message_detailed` VALUES ('23', 'MT', '1', '3', null, null, null, null, null, null, null, null, null, null, null, null, '2019-11-25 16:03:59', '2019-11-25 16:03:59');
COMMIT;

-- ----------------------------
--  Table structure for `sms_pricing`
-- ----------------------------
DROP TABLE IF EXISTS `sms_pricing`;
CREATE TABLE `sms_pricing` (
  `operator_id` varchar(45) NOT NULL COMMENT '运营商流水号UUID',
  `agent_id` varchar(45) NOT NULL COMMENT '短信通信代理商ID',
  `country_code` varchar(45) DEFAULT NULL COMMENT '国家简称编码如CN',
  `country_name` varchar(100) DEFAULT NULL COMMENT '国家名称如China',
  `country_display_name` varchar(256) DEFAULT NULL COMMENT '显示名称',
  `network_code` varchar(256) DEFAULT NULL COMMENT '网络如46000-46003',
  `network_aliases` varchar(1024) DEFAULT NULL COMMENT '网络区域码如46002,46004,46007,46008',
  `network_name` varchar(256) DEFAULT NULL COMMENT '运营商名称如China Mobile China Unicom China Telecom',
  `prefix` varchar(45) DEFAULT NULL COMMENT '前缀如86',
  `cost_price` decimal(18,8) DEFAULT NULL COMMENT '成本价',
  `price` decimal(18,8) DEFAULT NULL COMMENT '售价',
  `default_price` decimal(18,8) DEFAULT NULL COMMENT '默认价格',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态是否可用,true可用，false不可用',
  `sync_date_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '同步更新时间',
  `currency` varchar(45) DEFAULT NULL COMMENT '货币单位',
  `type` varchar(45) DEFAULT NULL COMMENT 'Landline固定电话,mobile移动电话',
  `mcc` varchar(45) DEFAULT NULL,
  `mnc` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`operator_id`),
  KEY `agent_id_idx` (`agent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='价格列表';

-- ----------------------------
--  Table structure for `sms_project`
-- ----------------------------
DROP TABLE IF EXISTS `sms_project`;
CREATE TABLE `sms_project` (
  `project_id` varchar(45) NOT NULL COMMENT 'UUID',
  `create_user_id` int(11) DEFAULT NULL COMMENT '用户ID',
  `sms_project_name` varchar(56) NOT NULL COMMENT '项目名称',
  `password` varchar(45) NOT NULL COMMENT '用于发送SMS',
  `token` varchar(256) NOT NULL COMMENT '秘钥',
  `channel_type` varchar(45) DEFAULT NULL COMMENT '通道类型sms,voice',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `call_back` varchar(256) DEFAULT NULL COMMENT '回调URL',
  PRIMARY KEY (`project_id`),
  UNIQUE KEY `sms_project_name_UNIQUE` (`sms_project_name`),
  UNIQUE KEY `project_id_UNIQUE` (`project_id`),
  UNIQUE KEY `password_UNIQUE` (`password`),
  UNIQUE KEY `token_UNIQUE` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='短信项目';

-- ----------------------------
--  Table structure for `sms_project_member`
-- ----------------------------
DROP TABLE IF EXISTS `sms_project_member`;
CREATE TABLE `sms_project_member` (
  `project_member_id` varchar(45) NOT NULL COMMENT '成员UUID',
  `project_id` varchar(45) DEFAULT NULL COMMENT '项目UUID',
  `user_id` int(11) DEFAULT NULL COMMENT '用户ID',
  PRIMARY KEY (`project_member_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目成员列表';

-- ----------------------------
--  Table structure for `sms_receive_email_setting`
-- ----------------------------
DROP TABLE IF EXISTS `sms_receive_email_setting`;
CREATE TABLE `sms_receive_email_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `receive_email` varchar(128) DEFAULT NULL COMMENT '邮箱',
  `contacts` varchar(56) DEFAULT NULL COMMENT '联系人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `sms_role`
-- ----------------------------
DROP TABLE IF EXISTS `sms_role`;
CREATE TABLE `sms_role` (
  `role_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(45) NOT NULL DEFAULT 'user' COMMENT '角色名称(‘user’,’sales’,’admin’)',
  `parent_id` int(11) DEFAULT NULL COMMENT '父角色id',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `des` text COMMENT '角色描述',
  `role_priv_level` tinyint(1) DEFAULT NULL COMMENT '角色权限等级',
  PRIMARY KEY (`role_id`),
  UNIQUE KEY `role_name_UNIQUE` (`role_name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COMMENT='用户角色表';

-- ----------------------------
--  Records of `sms_role`
-- ----------------------------
BEGIN;
INSERT INTO `sms_role` VALUES ('6', 'admin', null, '2019-11-20 17:44:47', null, '2'), ('7', 'sales', null, '2019-11-20 17:44:56', null, '1'), ('8', 'user', null, '2019-11-25 17:01:42', null, '0');
COMMIT;

-- ----------------------------
--  Table structure for `sms_submission_record`
-- ----------------------------
DROP TABLE IF EXISTS `sms_submission_record`;
CREATE TABLE `sms_submission_record` (
  `send_record_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '短信提交记录ID',
  `project_id` varchar(45) DEFAULT NULL COMMENT '项目ID',
  `free` decimal(18,8) DEFAULT NULL COMMENT '短信费用',
  `submit_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '发送时间',
  `direction` varchar(45) DEFAULT 'Outing' COMMENT '方向outing',
  `send_from` varchar(45) DEFAULT NULL COMMENT '发送者',
  `send_to` varchar(45) DEFAULT NULL COMMENT '接受者，号码满足E.164格式',
  `message_id` varchar(45) DEFAULT NULL COMMENT '消息ID（UUID）',
  `encoding` varchar(45) DEFAULT NULL COMMENT '短信发送编码方式',
  `message_count` int(11) DEFAULT NULL COMMENT '返回消息条数',
  `message_body` longtext COMMENT '消息内容',
  `network` varchar(45) DEFAULT NULL COMMENT '网络',
  `agent_id` varchar(45) DEFAULT NULL COMMENT '代理商ID',
  `error_text` longtext COMMENT '错误消息',
  `submit_status_code` int(11) DEFAULT NULL COMMENT '发送状态',
  `final_status` varchar(45) DEFAULT 'submit' COMMENT '消息最后的状态,从交货报告中更新过来.',
  `task_id` varchar(45) DEFAULT NULL COMMENT '任务表ID',
  `user_id` int(11) DEFAULT NULL COMMENT '发送短信用户ID(登录用户)',
  `cost_price` decimal(18,8) DEFAULT NULL COMMENT '成本价',
  `country_code` varchar(45) DEFAULT NULL COMMENT '国家简码CN',
  `prefix` varchar(45) DEFAULT NULL COMMENT '国家号码前缀86',
  `sms_type` varchar(45) DEFAULT NULL COMMENT 'single(单发), mass(群发)',
  `action_type` varchar(45) DEFAULT 'SMS' COMMENT '动作类型',
  `request_type` varchar(45) DEFAULT 'HTTP POST' COMMENT '提交方法(HTTP POST,HTTP GET,ALL)',
  `minus` tinyint(1) DEFAULT '0' COMMENT 'True(1) 已扣费,false(0)未扣费',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `message_timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`send_record_id`),
  UNIQUE KEY `send_ record_id_UNIQUE` (`send_record_id`)
) ENGINE=InnoDB AUTO_INCREMENT=538 DEFAULT CHARSET=utf8mb4 COMMENT='短信发送记录';

-- ----------------------------
--  Table structure for `sms_system_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sms_system_menu`;
CREATE TABLE `sms_system_menu` (
  `id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `menu_name` varchar(45) DEFAULT NULL COMMENT '菜单名称',
  `parent_id` int(11) DEFAULT NULL COMMENT '上级菜单',
  `menu_hierarchy` varchar(45) DEFAULT NULL COMMENT '菜单层级',
  `menu_level` int(11) DEFAULT NULL COMMENT '菜单级别',
  `icon_name` varchar(45) DEFAULT NULL COMMENT '菜单图片',
  `menu_url` varchar(45) DEFAULT NULL COMMENT '菜单URL',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `describe` text COMMENT '描述',
  `state` tinyint(4) DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COMMENT='菜单表';

-- ----------------------------
--  Records of `sms_system_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sms_system_menu` VALUES ('10', 'SMS面板', '0', null, null, null, 'Dashboard', null, null, null), ('11', '系统管理', '0', null, null, null, 'System', null, null, null), ('12', '用户管理', '11', null, null, null, 'System.User', null, null, null), ('13', '角色管理', '11', null, null, null, 'System.Role', null, null, null), ('14', '菜单管理', '11', null, null, null, 'System.Menu', null, null, null), ('26', 'SMS管理', '0', null, null, null, 'SMS', null, null, null), ('27', '代理商群组管理', '26', null, null, null, 'SMS.AgentGroup', null, null, null), ('28', '代理商管理', '26', null, null, null, 'SMS.Agent', null, null, null), ('32', 'SMS提交记录', '32', null, null, null, 'SMS.CommitRecord', null, null, null), ('34', '网站管理', '0', null, null, null, 'Web', null, null, null), ('35', '网站内容管理', '34', null, null, null, 'Web.WebContent', null, null, null), ('36', 'Api文档类别管理', '34', null, null, null, 'Web.ApiCategory', null, null, null), ('37', 'Api文档管理', '34', null, null, null, 'Web.ApiDocument', null, null, null), ('38', 'Api请求参数管理', '34', null, null, null, 'Web.ApiRequestParam', null, null, null), ('39', 'Api返回参数管理', '34', null, null, null, 'Web.ApiResponseParam', null, null, null), ('40', '短信报告', '26', null, null, null, 'SMS.SmsReport', null, null, null), ('42', '用户管理', '41', null, null, null, 'Sales.User', null, null, null), ('43', '列表查看', '12', null, null, null, 'System.User.List', null, null, null), ('44', '分配角色', '12', null, null, null, 'System.User.AssignRoles', null, null, null), ('45', '接口管理', '12', null, null, null, 'System.User.ApiManage', null, null, null), ('46', '列表查看', '45', null, null, null, 'System.User.ApiManage.List', null, null, null), ('47', '列表成本价格查看', '45', null, null, null, 'System.User.ApiManage.CostPrice', null, null, null), ('49', '账户明细', '12', null, null, null, 'System.User.AccountDetails', null, null, null), ('50', '修改所有类型价格', '45', null, null, null, 'System.User.ApiManage.ModifyAllTypesPrice', null, null, null), ('51', '列表修改售价', '45', null, null, null, 'System.User.ApiManage.ListModifySalePrice', null, null, null), ('52', '删除功能', '45', null, null, null, 'System.User.ApiManage.Delete', null, null, null), ('54', '代理商名称', '28', null, null, null, 'SMS.Agent.AgentNameColumn', null, null, null), ('55', '编辑', '28', null, null, null, 'SMS.Agent.ListUpdate', null, null, null), ('56', '创建', '28', null, null, null, 'SMS.Agent.ListCreate', null, null, null), ('57', '下载模板', '28', null, null, null, 'SMS.Agent.DownloadTemplate', null, null, null), ('58', '删除', '28', null, null, null, 'SMS.Agent.ListDelete', null, null, null), ('59', '列表查看', '28', null, null, null, 'SMS.Agent.List', null, null, null), ('60', '批量价格控制', '45', null, null, null, 'System.User.ApiManage.ControlAllTypesPrice', null, null, null), ('63', 'GW下载字段', '40', null, null, null, 'SMS.SmsReport.GW-Field', null, null, null), ('64', '发送者ID', '28', null, null, null, 'SMS.Agent.SenderIdColumn', null, null, null), ('65', '成本列', '40', null, null, null, 'SMS.SmsReport.CostPriceColumn', null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `sms_task_total`
-- ----------------------------
DROP TABLE IF EXISTS `sms_task_total`;
CREATE TABLE `sms_task_total` (
  `task_id` varchar(45) NOT NULL COMMENT '任务ID',
  `recipient_count` int(11) DEFAULT NULL COMMENT '总共收件人数量',
  `pending_count` int(11) DEFAULT NULL,
  `submitted_count` int(11) DEFAULT NULL COMMENT '已提交数量',
  `failed_count` int(11) DEFAULT NULL,
  `success_count` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`task_id`),
  UNIQUE KEY `task_id_UNIQUE` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='任务统计';

-- ----------------------------
--  Table structure for `sms_ui_content`
-- ----------------------------
DROP TABLE IF EXISTS `sms_ui_content`;
CREATE TABLE `sms_ui_content` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '内容id',
  `title_name` varchar(45) DEFAULT NULL COMMENT '菜单名称',
  `title_content` varchar(256) DEFAULT NULL COMMENT '菜单描述',
  `img_url` varchar(256) DEFAULT NULL COMMENT '图标',
  `parent_id` int(11) DEFAULT NULL COMMENT '没有父节点为-1',
  `sort_id` int(11) DEFAULT NULL COMMENT '排序ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `img_url2` varchar(512) DEFAULT NULL COMMENT '图标2',
  PRIMARY KEY (`id`),
  UNIQUE KEY `sort_id_UNIQUE` (`sort_id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COMMENT='系统主菜单表';

-- ----------------------------
--  Records of `sms_ui_content`
-- ----------------------------
BEGIN;
INSERT INTO `sms_ui_content` VALUES ('1', '我们的产品', '我们打造更快速更专业的全球通讯云服务平台', null, '0', null, '2019-11-15 10:09:25', null), ('2', '我们的优势', '短信、语音通讯，XindaCloud将会是您更好的选择', null, '0', null, '2019-11-15 10:09:36', null), ('3', '国际短信', '支持全球200多个国家和地区（含中国大陆）运营商，5秒响应，实时反馈。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/p1.jpg', '1', null, '2019-11-15 10:49:21', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E5%9B%BD%E9%99%85%E7%9F%AD%E4%BF%A1.png'), ('4', '国际语音', '全球语音验证码支持200多个国家及地区，作为短信的良好补充，更安全、便捷地满足用户验证、激活需求', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/p2.jpg', '1', null, '2019-11-15 10:49:29', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E5%9B%BD%E9%99%85%E8%AF%AD%E9%9F%B3.png'), ('5', '全球覆盖', '支持全球223个国际及地区（含中国大陆）运营商，每个国家全网覆盖。提供详细的运营商网络名单', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/duanxin/duanxin1.png', '3', null, '2019-11-15 11:00:18', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E7%9F%AD%E4%BF%A1/%E5%85%A8%E7%90%83.png'), ('6', '高转化率', '快速的到达速度，多通道智能分流，杜绝拥堵，毫秒级反应', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/duanxin/duanxin2.png', '3', null, '2019-11-15 11:00:42', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E7%9F%AD%E4%BF%A1/%E8%BD%AC%E5%8C%96%E7%8E%87.png'), ('7', '更专业的服务顾问', '我们深度了解国际通讯市场，根据您的需求，预先告知您当地国家的要求，更好的规避当地法律法规风险。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/duanxin/duanxin3.png', '3', null, '2019-11-15 11:00:59', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E7%9F%AD%E4%BF%A1/%E9%A1%BE%E9%97%AE.png'), ('8', '高品质语音线路', '快速送达，高品质语音播报，通话流畅、语音清晰。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuyin/yuyin1.png', '4', null, '2019-11-15 11:05:24', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E8%AF%AD%E9%9F%B3/%E7%BA%BF%E8%B7%AF.png'), ('9', '按需配置服务', '标准化，平台智能算法严选高品质运营商通道个性化，可量身定制，对接最适合您业务需求的运营商通道', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/y1.png', '2', null, '2019-11-26 17:24:13', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E6%88%91%E4%BB%AC%E7%9A%84%E4%BC%98%E5%8A%BF%E5%9B%BE%E6%A0%87/%E6%8C%89%E9%9C%80%E9%85%8D%E7%BD%AE%E6%9C%8D%E5%8A%A1.png'), ('10', '完善的API服务', '标准化，平台智能算法严选高品质运营商通道个性化，可量身定制，对接最适合您业务需求的运营商通道', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/y2.png', '2', null, '2019-11-26 17:24:33', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E6%88%91%E4%BB%AC%E7%9A%84%E4%BC%98%E5%8A%BF%E5%9B%BE%E6%A0%87/%E5%AE%8C%E5%96%84API%E6%9C%8D%E5%8A%A1.png'), ('11', '按需配置服务', 'HTTP/SMPP等多种标准方式简单接入，让您轻松测试信息处理全程安全加密，确保信息服务安全', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/y1.png', '2', null, '2019-11-26 17:25:01', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E6%88%91%E4%BB%AC%E7%9A%84%E4%BC%98%E5%8A%BF%E5%9B%BE%E6%A0%87/%E6%8C%89%E9%9C%80%E9%85%8D%E7%BD%AE%E6%9C%8D%E5%8A%A12.png'), ('12', '快速技术支持', '提供7*24小时业务咨询及技术支持一对一个性化技术服务', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/y3.png', '2', null, '2019-11-26 17:25:17', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E6%88%91%E4%BB%AC%E7%9A%84%E4%BC%98%E5%8A%BF%E5%9B%BE%E6%A0%87/%E5%BF%AB%E9%80%9F%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81.png'), ('13', '号码格式验证API', '通过号码格式验证API快速验证用户手机号码格式正确性，提高验证成功率，节约费用', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/p3.jpg', '1', null, '2019-11-29 09:14:48', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E5%8F%B7%E7%A0%81%E6%A0%BC%E5%BC%8F%E9%AA%8C%E8%AF%81API.png'), ('14', 'WEB自助发送', '提供WEB工具，可以在线自助发送，批量导入和管理会员号码，实时了解发送情况', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/p4.jpg', '1', null, '2019-11-29 09:15:01', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/WEB%E8%87%AA%E5%8A%A9%E5%8F%91%E9%80%81.png'), ('15', '可视化服务平台', '提供可视化服务平台，在线充值、统计分析，更好的用户体验，更透明化的平台服务', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/p5.jpg', '1', null, '2019-11-29 09:15:19', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E5%8F%AF%E8%A7%86%E5%8C%96%E6%9C%8D%E5%8A%A1.png'), ('16', '了解更多', '。。。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/p6.jpg', '1', null, '2019-11-29 09:15:27', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5%E5%9B%BE%E6%A0%87/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E9%A6%96%E9%A1%B5-%E4%BA%A7%E5%93%81/%E4%BA%86%E8%A7%A3%E6%9B%B4%E5%A4%9A.png'), ('17', '直连运营商', '我们尽可能直接与当地的运营商对接，建立快速反馈的沟通渠道，更专业更快速更细致的服务用户', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/duanxin/duanxin4.png', '3', null, '2019-11-29 10:35:19', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E7%9F%AD%E4%BF%A1/%E8%BF%90%E8%90%A5%E5%95%86.png'), ('18', '99.97%平台稳定', '平台全方面智能监控，自动警报，智能优化切换，让您高枕无忧。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/duanxin/duanxin5.png', '3', null, '2019-11-29 10:35:27', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E7%9F%AD%E4%BF%A1/%E7%A8%B3%E5%AE%9A.png'), ('19', '全球覆盖', '支持全球223个国家及地区，更好的补充短信验证。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuyin/yuyin2.png', '4', null, '2019-11-29 10:41:21', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E8%AF%AD%E9%9F%B3/%E5%85%A8%E7%90%83%E6%8B%B7%E8%B4%9D.png'), ('20', '自定义播报次数及语速', '可自定义报语音次数及控制语音播报速度，让用户不再错过内容。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuyin/yuyin3.png', '4', null, '2019-11-29 10:41:29', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E8%AF%AD%E9%9F%B3/%E8%87%AA%E5%AE%9A%E4%B9%89(1).png'), ('21', '个性化配置', '根据您的具体需求设置语音验证的当地号码作为Call sender，更好的体验及更好的解决方案。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuyin/yuyin4.png', '4', null, '2019-11-29 10:41:54', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E8%AF%AD%E9%9F%B3/%E9%85%8D%E7%BD%AE(1).png'), ('22', '全球号码段', '验证全球号码格式正确与否，更好的提高发送成功率。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuanzheng/yanzheng1.png', '13', null, '2019-11-29 10:42:08', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%B7%E7%A0%81%E6%A0%BC%E5%BC%8F%E9%AA%8C%E8%AF%81API/%E5%85%A8%E7%90%83%E6%8B%B7%E8%B4%9D2.png'), ('23', '减少费用损失', '通过验证号码格式，减少发送错误号码，为企业减少费用支出', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuanzheng/yanzheng2.png', '13', null, '2019-11-29 10:42:44', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%B7%E7%A0%81%E6%A0%BC%E5%BC%8F%E9%AA%8C%E8%AF%81API/%E5%87%8F%E5%B0%91.png'), ('24', '更好的用户体验', '提前验证用户的号码格式，用户注册更加高效，提高激活率。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuanzheng/yanzheng3.png', '13', null, '2019-11-29 10:42:49', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%B7%E7%A0%81%E6%A0%BC%E5%BC%8F%E9%AA%8C%E8%AF%81API/APM4-%E7%94%A8%E6%88%B7%E4%BD%93%E9%AA%8C.png'), ('25', '免费政策', '我们为使用我们短信以及语音的服务提供免费号码格式验证API服务。让您海外拓展更加专业。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/yuanzheng/yanzheng4.png', '13', null, '2019-11-29 10:42:51', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%B7%E7%A0%81%E6%A0%BC%E5%BC%8F%E9%AA%8C%E8%AF%81API/%E5%85%8D%E8%B4%B9.png'), ('26', '批量导入', '批量导入发送号码，没有技术仍然让您发送自如。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/websend/web1.png', '14', null, '2019-11-29 10:44:15', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/WEB%E8%87%AA%E5%8A%A9%E5%8F%91%E9%80%81/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5(1).png'), ('27', '自助发送', '减少代发的偷量现象，更好的提供成功率。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/websend/web2.png', '14', null, '2019-11-29 10:44:27', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/WEB%E8%87%AA%E5%8A%A9%E5%8F%91%E9%80%81/%E8%87%AA%E5%8A%A9%E7%9F%AD%E4%BF%A1.png'), ('28', '单个号码发送', '可针对单个号码进行测试发送。测试通道质量', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/websend/web3.png', '14', null, '2019-11-29 10:44:37', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/WEB%E8%87%AA%E5%8A%A9%E5%8F%91%E9%80%81/%E5%8F%91%E9%80%81.png'), ('29', '数据报告', '对发送号码实时记录，了解发送情况。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/websend/web4.png', '14', null, '2019-11-29 10:44:46', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/WEB%E8%87%AA%E5%8A%A9%E5%8F%91%E9%80%81/%E6%95%B0%E6%8D%AE%E6%8A%A5%E5%91%8A.png'), ('30', '详细的计费视图', '按日、按月统计每个国家计费情况，让您对您花的每一分钱可查溯，计费更透明', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/keshihua/keshihua1.png', '15', null, '2019-11-29 10:45:25', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%AF%E8%A7%86%E5%8C%96%E6%9C%8D%E5%8A%A1/%E8%AE%A1%E8%B4%B9.png'), ('31', '发送国家分析', '图形化发送的前十国家数据，更加准确的抓住您的重中之重。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/keshihua/keshihua2.png', '15', null, '2019-11-29 10:45:32', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%AF%E8%A7%86%E5%8C%96%E6%9C%8D%E5%8A%A1/%E5%88%86%E6%9E%90.png'), ('32', '发送数据实时统计', '详细的记录发送短信的每个国家每个网络的情况。让您对您的发送情况了如指掌。', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/czc-XindaCloud-product/keshihua/keshihua3.png', '15', null, '2019-11-29 10:45:37', 'https://sms-web-image.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E6%A0%87/%E4%BA%A7%E5%93%81%E9%A1%B5%E5%B0%8F%E5%9B%BE%E6%A0%87/%E5%8F%AF%E8%A7%86%E5%8C%96%E6%9C%8D%E5%8A%A1/%E5%AE%9E%E6%97%B6%E6%95%B0%E6%8D%AE%E7%BB%9F%E8%AE%A1.png');
COMMIT;

-- ----------------------------
--  Table structure for `sms_user`
-- ----------------------------
DROP TABLE IF EXISTS `sms_user`;
CREATE TABLE `sms_user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '序列号，自增',
  `username` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名',
  `password` varchar(256) NOT NULL COMMENT '登录密码,MD5加密',
  `account_name` varchar(45) DEFAULT NULL COMMENT '账号名',
  `account_type` varchar(45) DEFAULT NULL COMMENT '账号类型',
  `nickname` varchar(45) DEFAULT NULL COMMENT '昵称',
  `first_name` varchar(45) DEFAULT NULL COMMENT 'first_name',
  `last_name` varchar(45) DEFAULT NULL COMMENT 'last_name',
  `email` varchar(45) NOT NULL COMMENT '注册电子邮箱',
  `sex` tinyint(4) DEFAULT NULL COMMENT '性别0女，1男',
  `mobile` varchar(45) DEFAULT NULL COMMENT '手机号码',
  `birthday` varchar(45) DEFAULT NULL COMMENT '生日',
  `personer_website` varchar(256) DEFAULT NULL COMMENT '个人网页',
  `sign` text COMMENT '个性签名',
  `register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
  `status` tinyint(1) DEFAULT '0' COMMENT '是否禁用,true为禁用',
  `last_login_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '最后登录时间',
  `balance` decimal(18,8) DEFAULT '0.00000000' COMMENT '账户余额',
  `address` varchar(256) DEFAULT NULL COMMENT '地址',
  `city` varchar(45) DEFAULT NULL COMMENT '城市',
  `post_code` int(11) DEFAULT NULL COMMENT '邮编',
  `country` varchar(45) DEFAULT NULL COMMENT '国家',
  `time_zone` varchar(256) DEFAULT NULL COMMENT '时区',
  `language` varchar(45) DEFAULT NULL COMMENT '语言',
  `display_currency` varchar(45) DEFAULT NULL COMMENT '显示货币',
  `parent_user_id` int(11) DEFAULT NULL COMMENT '上级用户',
  `apply_status` tinyint(4) DEFAULT NULL COMMENT '申请状态0已申请，1申请中',
  `apply_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间',
  `weixin_qrcode` varchar(512) DEFAULT NULL COMMENT '微信二维码',
  `qrcode_state` tinyint(8) DEFAULT NULL COMMENT '二维码状态：是否显示0不显示，1显示',
  `default_sender` varchar(45) DEFAULT NULL COMMENT '发送短信ID或者编号',
  `company` varchar(128) DEFAULT NULL COMMENT '公司名称',
  `company_site` varchar(512) DEFAULT NULL COMMENT '公司网站',
  PRIMARY KEY (`user_id`,`username`,`email`),
  UNIQUE KEY `id_UNIQUE` (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `sms_user`
-- ----------------------------
BEGIN;
INSERT INTO `sms_user` VALUES ('1', 'admin', '202cb962ac59075b964b07152d234b70', 'test1@126.com', null, 'aa', null, null, 'company11', null, '136888888', '2019-11-21', null, null, '2019-10-09 15:20:41', '0', '2019-10-09 15:20:41', '104761.87966444', 'hsl', null, null, 'CN', null, null, '￥', '0', '0', '2019-10-16 09:20:40', 'https://czc.s3.cn-northwest-1.amazonaws.com.cn/test/weixin-QRCode/20191216145847.jpg', '1', 'admin001', null, 'companySite11'), ('14', 'test123', 'cc03e747a6afbbcbf8be7668acfebee5', 'test', 'Chinese', '12345', '李', '哈哈', 'lyp@163.com', '0', '18888888888', '2019-11-27', '1234', '123', '2019-11-27 11:05:52', '0', '2019-11-27 11:05:52', '115.12728880', '123', '123', '123', 'China', '8', 'Chinese', '￥', '1', '0', '2019-11-27 11:05:52', null, null, '李哈哈', null, null), ('60', 'test1@126.com', '86be2651220c9816d205ae88ef03f1d6', 'aws', 'Chinese', null, null, null, 'aws@123.com', '1', '13670000000', null, null, null, '2019-12-19 11:05:41', '0', '2019-12-19 11:05:41', '34.00000000', null, null, null, 'china', '8', 'Chinese', '¥', '1', '0', '2019-12-19 11:05:41', null, null, 'tt', null, null), ('62', 'ning.lv@bosicloud.com', '721ca7726af9ca606fde32d5463d5ded', 'lvning007', null, null, 'lv', 'ning', 'ning.lv@bosicloud.com', '1', '15017935045', null, null, null, '2019-12-23 11:29:30', '0', '2019-12-23 11:29:30', '998.19826444', 'shenzheng', 'sz', null, '中国', null, null, '¥', '1', '0', '2019-12-23 11:29:30', null, null, 'lvning007', null, null), ('64', 'lvning300@163.com', '5274cc77e01ba4c68e1dff2f0f847fee', 'lvning300', null, null, 'lv', 'ning', 'lvning300@163.com', '1', null, null, null, null, '2019-12-24 11:00:24', '0', '2019-12-24 11:00:24', '995.06940000', 'shenzheng', 'sz', null, '中国', null, null, '￥', '62', '0', '2019-12-24 11:00:24', null, null, 'lvning300', null, null), ('70', 'tt@tt.com', '5aa83310d9dcf6ee6ac94ac69e5fe417', 'tt', 'English', null, null, null, 'tt@tt.com', null, '13888888888', null, null, null, '2019-12-27 11:09:08', '1', '2019-12-27 11:09:08', '0.00000000', null, null, null, 'China', '8', 'Chinese', '€', '1', null, '2019-12-27 11:09:08', null, null, 'tt', null, null), ('71', 'Lijing@bosicloud.com', '0b8fc0c7b00483dff48cb701f47a9f27', 'Lijing', 'English', null, 'Li', 'jing', 'Lijing@bosicloud.com', null, '13480635100', null, null, null, '2020-01-02 09:02:15', '0', '2020-01-02 09:02:15', '100.00000000', null, null, null, 'China', '8', 'Chinese', '$', '1', null, '2020-01-02 09:02:15', null, null, 'Lj', null, null), ('72', 'eten.gao@bosicloud.com', '0b8fc0c7b00483dff48cb701f47a9f27', 'eten.gao@bosicloud.com', 'English', null, 'gao', 'eten', 'eten.gao@bosicloud.com', null, '13480635100', null, null, null, '2020-01-02 09:20:10', '0', '2020-01-02 09:20:10', '59.24760000', null, null, null, 'China', '8', 'Chinese', '$', '1', null, '2020-01-02 09:20:10', null, null, 'eten', null, null), ('74', 'awstest2@123.com', '4d4bcaa0ed94feec7d19157d879d8804', 'awstest2', 'English', null, null, null, 'awstest2@123.com', null, '1367008888', null, null, null, '2020-01-02 09:41:44', '0', '2020-01-02 09:41:44', '0.00000000', null, null, null, 'China', '8', 'Chinese', '€', '1', null, '2020-01-02 09:41:44', null, null, 'ttest', null, null), ('88', 'czc@126.com', '90515d6d95c4d263bc942af9e601e626', 'czc@126.com', 'Chinese', null, null, null, 'czc@126.com', null, '13688888888', null, null, null, '2020-01-03 15:34:58', '0', '2020-01-03 15:34:58', '89.92760000', null, null, null, 'China', '8', 'Chinese', '¥', '1', null, '2020-01-03 15:34:58', null, null, 'test', null, null), ('89', 'czc@test.com', '90515d6d95c4d263bc942af9e601e626', 'czc@test.com', 'Chinese', null, null, null, 'czc@test.com', null, '13688888888', null, null, null, '2020-01-03 15:37:15', '0', '2020-01-03 15:37:15', '0.00000000', null, null, null, 'China', '8', 'Chinese', '¥', '1', null, '2020-01-03 15:37:15', null, null, 'czc', null, null), ('90', '15017935045@qq.com', '721ca7726af9ca606fde32d5463d5ded', 'lvning008', 'English', null, 'lv', 'ning', '15017935045@qq.com', null, '15017935045', null, null, null, '2020-01-09 16:28:59', '0', '2020-01-09 16:28:59', '0.00000000', null, null, null, 'China', '8', 'Chinese', '€', '1', null, '2020-01-09 16:28:59', null, null, 'lvning008', null, null), ('91', 'testczc@t.com', 'cc0e06322b8bb0ba483c8ec0295237e3', 'testczc@t.com', 'Chinese', null, null, null, 'testczc@t.com', null, '1388888888', null, null, null, '2020-01-10 20:40:54', '0', '2020-01-10 20:40:54', '0.00000000', null, null, null, 'China', '8', 'Chinese', '€', '1', null, '2020-01-10 20:40:54', null, null, 'test', null, null), ('92', 'dr@seeliv.com', '40cbda8baf0c280bf288b8f7bd6334e3', 'Hopedin', 'English', null, null, null, 'dr@seeliv.com', null, '15579830172', null, null, null, '2020-01-12 19:34:06', '0', '2020-01-12 19:34:06', '0.85590000', null, null, null, 'China', '8', 'English', '€', '1', null, '2020-01-12 19:34:06', null, null, 'Seeliv', 'Hopedin International Education And Business', null), ('93', 'eten_gao@bosicloud.com', '0b8fc0c7b00483dff48cb701f47a9f27', 'eten_gao@bosicloud.com', 'English', null, 'gao', 'eten', 'eten_gao@bosicloud.com', null, '13480635100', null, null, null, '2020-01-12 20:49:53', '0', '2020-01-12 20:49:53', '149.65060000', null, null, null, 'China', '8', 'Chinese', '$', '71', null, '2020-01-12 20:49:53', null, null, 'eten', 'Bosicloud', 'www.bosicloud.com'), ('94', 'xu.zhen@bosicloud.com', '0b8fc0c7b00483dff48cb701f47a9f27', 'xu.zhen@bosicloud.com', 'Chinese', null, 'xu', 'zhen', 'xu.zhen@bosicloud.com', null, '15801473668', null, null, null, '2020-01-13 11:04:02', '0', '2020-01-13 11:04:02', '-0.02460000', null, null, null, 'China', '8', 'Chinese', '€', '1', null, '2020-01-13 11:04:02', null, null, 'xu.zhen', 'Bosicloud', 'www.bosicloud.com'), ('96', 'czc2@t.com', '90515d6d95c4d263bc942af9e601e626', 'czc2@t.com', 'English', null, null, null, 'czc2@t.com', null, '13677777', null, null, null, '2020-01-13 14:32:11', '0', '2020-01-13 14:32:11', '0.00000000', null, null, null, 'China', '8', 'Chinese', '€', '88', null, '2020-01-13 14:32:11', null, null, 'ttt', null, null), ('98', 'Yiting.gao@bosicloud.com', '4ffba3228ee0233bbc6e056d36de7a7b', 'Yiting.gao@bosicloud.com', 'English', null, 'gao', 'yiting', 'Yiting.gao@bosicloud.com', null, '13480635100', null, null, null, '2020-01-15 15:07:00', '0', '2020-01-15 15:07:00', '0.60130000', null, null, null, 'China', '8', 'Chinese', '€', '71', null, '2020-01-15 15:07:00', null, null, 'yiting', 'Bosicloud', 'www.bosicloud.com');
COMMIT;

-- ----------------------------
--  Table structure for `sms_user_allow_operator`
-- ----------------------------
DROP TABLE IF EXISTS `sms_user_allow_operator`;
CREATE TABLE `sms_user_allow_operator` (
  `allow_operator_id` varchar(45) NOT NULL COMMENT '流水号UUID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `operator_id` varchar(45) NOT NULL COMMENT '运营商流水号UUID',
  `agent_id` varchar(45) NOT NULL COMMENT '短信通信代理商ID',
  `country_code` varchar(45) DEFAULT NULL COMMENT '国家简称编码如CN',
  `country_name` varchar(100) DEFAULT NULL COMMENT '国家名称如China',
  `country_display_name` varchar(256) DEFAULT NULL COMMENT '显示名称',
  `network_code` varchar(256) DEFAULT NULL COMMENT '网络如46000-46003',
  `network_aliases` varchar(1024) DEFAULT NULL COMMENT '网络区域码如46002,46004,46007,46008',
  `network_name` varchar(256) DEFAULT NULL COMMENT '运营商名称如China Mobile China Unicom China Telecom',
  `prefix` varchar(45) DEFAULT NULL COMMENT '前缀如86',
  `cost_price` decimal(18,8) DEFAULT '0.00000000' COMMENT '成本价',
  `price` decimal(18,8) DEFAULT '0.00000000' COMMENT '售价',
  `default_price` decimal(18,8) DEFAULT '0.00000000' COMMENT '默认价格',
  `currency` varchar(45) DEFAULT NULL COMMENT '货币单位',
  `type` varchar(45) DEFAULT NULL COMMENT 'Landline固定电话,mobile移动电话',
  `mcc` varchar(45) DEFAULT NULL,
  `mnc` varchar(45) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1' COMMENT 'true为开启，false为关闭',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `last_update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间',
  `special_offer_status` tinyint(1) DEFAULT '0' COMMENT '0不申请，1申请,2通过，3拒绝',
  `cost_and_default` varchar(80) DEFAULT '1' COMMENT '成本价与默认价关系',
  `default_and_sales` varchar(80) DEFAULT '1' COMMENT '默认价与售价关系',
  PRIMARY KEY (`allow_operator_id`),
  UNIQUE KEY `id_UNIQUE` (`allow_operator_id`),
  KEY `user_id_idx` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='授权给用户的短信通道';

-- ----------------------------
--  Table structure for `sms_user_role`
-- ----------------------------
DROP TABLE IF EXISTS `sms_user_role`;
CREATE TABLE `sms_user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '流水ID',
  `user_id` int(11) NOT NULL COMMENT '用户表id',
  `role_id` int(11) NOT NULL COMMENT '角色表ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8mb4 COMMENT='用户角色表';

-- ----------------------------
--  Records of `sms_user_role`
-- ----------------------------
BEGIN;
INSERT INTO `sms_user_role` VALUES ('16', '9', '7', '2019-11-13 10:04:27'), ('31', '1', '6', '2019-12-13 16:56:12'), ('33', '47', '7', '2019-12-17 11:22:56'), ('36', '14', '7', '2019-12-18 21:32:25'), ('37', '14', '8', '2019-12-18 21:32:25'), ('38', '14', '6', '2019-12-18 21:32:25'), ('39', '60', '7', '2019-12-19 11:06:00'), ('41', '62', '7', '2019-12-23 11:30:10'), ('42', '64', '8', '2019-12-24 11:00:42'), ('45', '56', '7', '2019-12-26 15:11:41'), ('46', '67', '7', '2019-12-26 15:43:59'), ('47', '71', '7', '2020-01-02 09:10:09'), ('48', '73', '7', '2020-01-02 09:35:14'), ('49', '74', '7', '2020-01-02 09:42:15'), ('50', '88', '7', '2020-01-03 15:35:10'), ('51', '75', '7', '2020-01-07 10:32:10'), ('53', '90', '6', '2020-01-09 16:29:22'), ('55', '72', '7', '2020-01-13 13:59:41'), ('56', '92', '7', '2020-01-15 16:01:31');
COMMIT;

-- ----------------------------
--  Table structure for `sms_website_info`
-- ----------------------------
DROP TABLE IF EXISTS `sms_website_info`;
CREATE TABLE `sms_website_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `website_name` varchar(54) DEFAULT NULL COMMENT '网站信息',
  `backgroud_style` varchar(256) DEFAULT NULL COMMENT '后台风格',
  `backup_info` varchar(256) DEFAULT NULL COMMENT '备案信息',
  `website_email` varchar(54) DEFAULT NULL COMMENT '站长邮箱',
  `count_code` text COMMENT '统计代码',
  `seo_title` varchar(256) DEFAULT NULL COMMENT 'seo标题',
  `seo_keyword` varchar(256) DEFAULT NULL COMMENT 'seo关键字',
  `seo_describe` text COMMENT 'seo描述',
  `user_regist` tinyint(4) DEFAULT NULL COMMENT '是否开放注册0开放，1不开放',
  `special_username` varchar(54) DEFAULT NULL COMMENT '特殊用户名',
  `cdn_address` text COMMENT 'cdn地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

SET FOREIGN_KEY_CHECKS = 1;
